import request from '@/utils/request'
/* 员工(用户列表) */
export const getUserlist = (params)=>{
  return request('/park/sys/user',{
    params
  })
}

/* 添加用户 */
export const addUserlist = ({name,userName,roleId,roleName,status,phonenumber}) => {
  return request.post('/park/sys/user',{
    name,
    userName,
    roleId,
    roleName,
    status,
    phonenumber,
  })
}

/*  用户详情 */
export const particlist = (id) => {
  return request.get(`/park/sys/user/${id}`)
}
/* 编辑用户 */
export const editUserlist = ({id,name,userName,roleId,roleName,status,phonenumber}) => {
  return request.put('/park/sys/user',{
    id,
    name,
    userName,
    roleId,
    roleName,
    status,
    phonenumber,
  })
}

/* 删除 */
export const delList = (id) =>{
  return request.delete(`/park/sys/user/${id}`,{
    id
  })
}